<?php
namespace support\bootstrap;

use think\cache\Driver;
use Webman\Bootstrap;

use think\facade\Cache as ThinkCache;

/**
 * Class Cache
 * @package support\bootstrap
 * @method static string|bool get($key , $default = null)
 * @method static bool set($key , $val , $expire = null)
 * @method static bool has($key)
 * @method static bool delete($key)
 * @method static bool clear()
 * @method static mixed pull(string $name)
 * @method static mixed remember(string $name , $val , $expire = null)
 * @method static string|integer inc(string $name , $step = 1)
 * @method static string|integer dec(string $name , $step = 1)
 * @method static Driver tag($name)
 * @method static Driver store(string $name , bool $force = false)
 */
class Cache
{


    /**
     * @param \Workerman\Worker $worker
     * @return void
     */
    public static function start($worker)
    {
        $config = config('cache');
        ThinkCache::config($config);
    }

    /**
     * 静态回调
     * @param $name
     * @param $arguments
     * @return mixed
     */
    public static function __callStatic($name, $arguments)
    {
        return ThinkCache::$name(...$arguments);
    }

}